package top.lunarye.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lunar
 * @since 2022-07-19
 */
@Getter
@ToString
@AllArgsConstructor
public enum DeduplicationType {

    CONTENT(10, "N分钟相同内容去重"),
    FREQUENCY(20, "一天内一人N次相同渠道内容")
    ;

    private final Integer code;
    private final String description;

    /**
     * 获取去重渠道的列表
     * @return
     */
    public static List<Integer> getDeduplicationList() {
        var result = new ArrayList<Integer>();
        for (DeduplicationType value : DeduplicationType.values()) {
            result.add(value.getCode());
        }
        return result;
    }

}
